<?php
namespace app\home\controller;
use app\home\model\KnowsModel;
use think\Controller;
use app\home\controller\Knows;
class Babyhome extends Controller
{
    /**
     * 专题首页
     */
    public function index(){
        $msg = new Knows();
        $msg = $msg->getKnowName();
        $this->assign('msg',$msg);
        return $this->fetch('index');
    }

    public function getMsg(){
        $id=input('id');
        $showMsg = new KnowsModel();
        $showMsg =$showMsg->getKnowsMsg($id);
        $thisTitle = $showMsg[0]['know_name'];
        $this->assign('thisTitle',$thisTitle);
        $this->assign('showMsg',$showMsg);
        return $this->fetch('baby_showmsg');
    }
}